package com.icongyou.enterprise.common.dictionary;

import lombok.Getter;

@Getter
public enum UserTypeEnum {
    STUDENT(0, "学生"),
    TEACHER(1, "教师"),
    ENTERPRISE_HR(2, "企业HR");

    private final Integer value;
    private final String description;

    UserTypeEnum(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static UserTypeEnum getByValue(Integer value) {
        for (UserTypeEnum type : UserTypeEnum.values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }
}